package com.yanqu.road.entity.kuang.battle;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.player.UserBaseInfo;

import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;

@FieldTypeAnnotation(tableName = "t_c_kuang_treasure_notice_data")
public class CrossKuangTreasureNoticeData extends DataObject {

    @FieldTypeAnnotation(desc = "周次id", select = true, update = true)
    private int weekId;

    @FieldTypeAnnotation(desc = "分组id", select = true, update = true)
    private int groupId;

    @FieldTypeAnnotation(desc = "阵营ID", select = true, update = true)
    private int campId;

    @FieldTypeAnnotation(desc = "宝库轮次")
    private int round;

    @FieldTypeAnnotation(desc = "奖励")
    private String reward = "";

    @FieldTypeAnnotation(desc = "用户id")
    private long userId;

    @FieldTypeAnnotation(desc = "开启人信息")
    private UserBaseInfo userBaseInfo = new UserBaseInfo();

    @FieldTypeAnnotation(desc = "开启时间")
    private long openTime;

    public int getWeekId() {
        return weekId;
    }

    public void setWeekId(int weekId) {
        if (this.weekId != weekId) {
            this.weekId = weekId;
            setOp(DataStatus.Update);
        }
    }

    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        if (this.groupId != groupId) {
            this.groupId = groupId;
            setOp(DataStatus.Update);
        }
    }

    public int getCampId() {
        return campId;
    }

    public void setCampId(int campId) {
        if (this.campId != campId) {
            this.campId = campId;
            setOp(DataStatus.Update);
        }
    }

    public int getRound() {
        return round;
    }

    public void setRound(int round) {
        if (this.round != round) {
            this.round = round;
            setOp(DataStatus.Update);
        }
    }

    public String getReward() {
        return reward;
    }

    public void setReward(String reward) {
        if (!Objects.equals(this.reward, reward)) {
            this.reward = reward;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public UserBaseInfo getUserBaseInfo() {
        return userBaseInfo;
    }

    public void setUserBaseInfo(UserBaseInfo userBaseInfo) {
        if (userBaseInfo == null) {
            return;
        }
        this.userBaseInfo = userBaseInfo;
        setOp(DataStatus.Update);
    }

    public long getOpenTime() {
        return openTime;
    }

    public void setOpenTime(long openTime) {
        if (this.openTime != openTime) {
            this.openTime = openTime;
            setOp(DataStatus.Update);
        }
    }
}
